import styled from 'styled-components'

const MenuWrapper = styled.div`
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
   > div:nth-child(3) {
      width: 100%;
      height: 100%;
      position:relative;
      overflow: hidden;
   }
`

const MenuHeader = styled.div`
  width: 100%;
  height: .52rem;
  background: #ee7530;
  display: flex;
  align-items: center;
`;
const MenuNav = styled.div`
  width: 60%;
  height: .24rem;
  border-radius: 50%;
  margin:0 auto;
  color:#fff;
  border:.01rem solid #ee7530;
  display: flex;
  position: relative;
  z-index:1;
`

const MenuItem = styled.div`
  width: 50%;
  height: 100%;
  text-align: center;
  line-height: .24rem;
  color:${props => props.active ? '#ee7530' : '#fff'}
`

const MenuSlider = styled.div`
  width: 50%;
  height: 100%;
  background: #fff;
  position: absolute;
  top:0;
  left:${props => props.pos === 'right' ? '50%' : '0'};
  z-index: -1;
  transition:  0.5s all;
`

const Menulist = styled.div`
  width: 100%;
  position: absolute;
  display: flex;
  flex:1;
  border-top: 1px solid #ccc;
`

const MenuListNav = styled.ul`
  width: .93rem;
  background: #f3f3f3;
  padding-bottom:1000px;
  margin-bottom:-1000px;
`

const MenuListNavItem = styled.li`
  height: .48rem;
  background: ${props => props.active ? '#fff' : ''};
  text-align: center;
  line-height: .48rem;
  span {
    display: inline-block;
    height: 100%;
    line-height: .48rem;
    border-bottom:.02rem solid ${props => props.active ? '#ee7530' : 'rgba(0,0,0,0)'};
  }
`
const MenuListContent = styled.div`
  background: #fff;
  padding:.2rem;
  flex:1;
  padding-bottom:1000px;
  margin-bottom:-1000px;
`

export {
    MenuWrapper,
    MenuHeader,
    MenuNav,
    MenuItem,
    MenuSlider,
    Menulist,
    MenuListNav,
    MenuListNavItem,
    MenuListContent
}
